import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animation/list_page.dart';
import 'package:flutter_animation/second_page.dart';
import 'package:flutter_animation/utils/constant.dart';

class FirstPage extends StatefulWidget{
  @override
  State<StatefulWidget> createState() {
    return _FirstPageState();
  }
}

class _FirstPageState extends State<FirstPage>{

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(
          Constant.firstTitle,
          key: Key(Constant.firstTitleKey),
        ),
      ),
      body: Column(
        children: <Widget>[
          GestureDetector(
            key: Key(Constant.homeJumpListKey),
            onTap: (){
              Navigator.of(context).push(MaterialPageRoute(builder: (_){
                return ListPage();
              },settings: RouteSettings(name: Constant.listTitle)));
            },
            child: Center(
              child: Container(
                width: 100,
                height: 100,
                color: Colors.red,
              ),
            ),
          )
        ],
      ),
    );
  }

}